package com.example.model;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

/**
 * Created by Chenjie on 2017/7/4.
 */
@Document(indexName = "school", type = "classRoom")
public class ClassRoom {
    @Id
    private Long roomId;

    @Field(store = true)
    private String name;

    public ClassRoom() {}

    public Long getRoomId() {
        return roomId;
    }

    public void setRoomId(Long roomId) {
        this.roomId = roomId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "ClassRoom{" +
                "roomId=" + roomId +
                ", name='" + name + '\'' +
                '}';
    }
}
